import { useGlobalIconFont } from './assets/Iconfont/helper';

export default defineAppConfig({
  window: {
    backgroundColor: '#f8f8f8',
    backgroundTextStyle: 'light',
    navigationBarBackgroundColor: '#fff',
    navigationBarTextStyle: 'black',
    // navigationStyle: 'custom', // 使用自定义导航栏
  },
  // eslint-disable-next-line react-hooks/rules-of-hooks
  usingComponents: Object.assign(useGlobalIconFont()),
  requiredPrivateInfos: ['getLocation', 'chooseAddress', 'choosePoi', 'chooseLocation'],
  permission: {
    'scope.userLocation': {
      desc: '获取当前位置',
    },
  },
  tabBar: {
    list: [
      {
        pagePath: 'pages/index/index',
        text: '首页',
        iconPath: 'assets/images/home.png',
        selectedIconPath: 'assets/images/home_active.png',
      },
      {
        pagePath: 'pages/contact/index',
        text: '通讯录',
        iconPath: 'assets/images/contact.png',
        selectedIconPath: 'assets/images/contact_active.png',
      },
      {
        pagePath: 'pages/chat/index',
        text: '聊天',
        iconPath: 'assets/images/chat.png',
        selectedIconPath: 'assets/images/chat_active.png',
      },
      {
        pagePath: 'pages/user/index',
        text: '我的',
        iconPath: 'assets/images/mine.png',
        selectedIconPath: 'assets/images/mine_active.png',
      },
    ],
    selectedColor: '#0079FE',
    custom: false, // 使用自定义 tabBar 为true
  },
  pages: [
    'pages/index/index', // 首页
    'pages/contact/index', // 通讯录
    'pages/chat/index', // 聊天
    // 'pages/chatlist/index', // 聊天
    'pages/user/index', // 我的
    'pages/login/index', // 登录
    'pages/register/index', // 注册
    // 'pages/publish/index', // 发布
    // 'pages/search/index', // 搜索
    // 'pages/detail/index', // 详情
    // 'pages/report/index', // 举报
    // 'pages/myPublish/index', // 我的发布
    'pages/credits/index', // 我的积分记录
    // 'pages/reportRecord/index', // 我的举报记录
    // 'pages/applyFriend/index', // 申请好友
    // 'pages/myCollection/index', // 我的收藏
    // 'pages/userAddress/index', // 收货地址
    // 'pages/addUserAddress/index', // 添加收货地址
    // 'pages/person/index', // 个人资料
    // 'pages/person2/index', // 个人资料2
    // 'pages/agreement/index', // 用户协议
    // 'pages/privacyPolicy/index', // 隐私政策
    // 'pages/vipStatement/index', // 会员声明
    // 'pages/cityPartnerApplication/index', // 城市合伙人申请
    // 'pages/nearbyFriends/index', // 附近的豹友
    // 'pages/searchFriend/index', // 搜索好友
    // 'pages/searchPublicFriend/index', // 搜索公开豹友
  ],
  subPackages: [
    {
      root: 'subPackages/publish',
      pages: [
        'index', // => src/subpackages/publish/index.tsx
      ],
    },
    // {
    //   root: 'subPackages/chat',
    //   pages: [
    //     'index', // => src/subpackages/chat/index.tsx
    //   ],
    // },
    {
      root: 'subPackages/person',
      pages: [
        'index', // => src/subpackages/person/index.tsx
      ],
    },
    {
      root: 'subPackages/person2',
      pages: [
        'index', // => src/subpackages/person2/index.tsx
      ],
    },
    {
      root: 'subPackages/myPublish',
      pages: [
        'index', // => src/subpackages/myPublish/index.tsx
      ],
    },
    {
      root: 'subPackages/report',
      pages: [
        'index', // => src/subpackages/report/index.tsx
      ],
    },
    {
      root: 'subPackages/search',
      pages: [
        'index', // => src/subpackages/search/index.tsx
      ],
    },
    {
      root: 'subPackages/detail',
      pages: [
        'index', // => src/subpackages/detail/index.tsx
      ],
    },
    {
      root: 'subPackages/editPhone',
      pages: [
        'index', // => src/subpackages/editPhone/index.tsx
      ],
    },
    {
      root: 'subPackages/reportRecord',
      pages: [
        'index', // => src/subpackages/reportRecord/index.tsx
      ],
    },
    {
      root: 'subPackages/invoice',
      pages: [
        'index', // => src/subpackages/invoice/index.tsx
      ],
    },
    {
      root: 'subPackages/myCollection',
      pages: [
        'index', // => src/subpackages/invoice/index.tsx
      ],
    },
    {
      root: 'subPackages/addUserAddress',
      pages: [
        'index', // => src/subpackages/invoice/index.tsx
      ],
    },
    {
      root: 'subPackages/category',
      pages: [
        'index', // => src/subpackages/invoice/index.tsx
      ],
    },
    {
      root: 'subPackages/cityPartnerApplication',
      pages: [
        'index', // => src/subpackages/invoice/index.tsx
      ],
    },
    {
      root: 'subPackages/applyFriend',
      pages: [
        'index', // => src/subpackages/invoice/index.tsx
      ],
    },
    {
      root: 'subPackages/agreement',
      pages: [
        'index', // => src/subpackages/invoice/index.tsx
      ],
    },
    {
      root: 'subPackages/userDetail',
      pages: [
        'index', // => src/subpackages/userDetail/index.tsx
      ],
    },
    {
      root: 'subPackages/vipStatement',
      pages: [
        'index', // => src/subpackages/vipStatement/index.tsx
      ],
    },
    {
      root: 'subPackages/privacyPolicy',
      pages: [
        'index', // => src/subpackages/privacyPolicy/index.tsx
      ],
    },
    {
      root: 'subPackages/equity',
      pages: [
        'index', // => src/subpackages/equity/index.tsx
      ],
    },
    {
      root: 'subPackages/remark',
      pages: [
        'index', // => src/subpackages/remark/index.tsx
      ],
    },
    {
      root: 'subPackages/groups',
      pages: [
        'index', // => src/subpackages/groups/index.tsx
      ],
    },
    {
      root: 'subPackages/groups1',
      pages: [
        'index', // => src/subpackages/groups/index.tsx
      ],
    },
    {
      root: 'subPackages/nearbyFriends',
      pages: [
        'index', // => src/subpackages/nearbyFriends/index.tsx
      ],
    },
    {
      root: 'subPackages/searchPublicFriend',
      pages: [
        'index', // => src/subpackages/searchPublicFriend/index.tsx
      ],
    },
    {
      root: 'subPackages/publishEdit',
      pages: [
        'index', // => src/subpackages/publishEdit/index.tsx
      ],
    },
    {
      root: 'subPackages/chatlist',
      pages: [
        'index', // => src/subpackages/chatlist/index.tsx
      ],
    },
    {
      root: 'subPackages/searchFriend',
      pages: [
        'index', // => src/subpackages/searchFriend/index.tsx
      ],
    },
  ],
});
